<template>
	<view class="content">
		<view class="status_bar">
		</view>
		<web-view :webview-styles="webviewStyles" class="web" src="https://www.baidu.com"></web-view>
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello...3',
				webviewStyles: {
					progress: false
				}
			}
		},
		onLoad() {
			uni.request({
			    url: 'http://192.1.22.69/test.json', //仅为示例，并非真实接口地址。
			    data: {
			        text: 'uni.request'
			    },
			    header: {
			        'custom-header': 'hello' //自定义请求头信息
			    },
			    success: res => {
			        console.log(res.data);
			        this.title = res.data.id;
			    }
			});
		},
		methods: {

		}
	}
</script>

<style>
	.web{
		padding-top: var(--status-bar-height);
	}
	.status_bar {
	      height: var(--status-bar-height);
	      width: 100%;
		  background-color: black;
	  }
	.logo {
		height: 200rpx;
		width: 200rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
